package com.wedo.book.mapper;

import com.wedo.book.pojo.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface CategoryMapper extends Mapper<Category> {

    @Select("select c.* from book b join category c where b.id = #{bid} and b.c_id = c.id;")
    List<Category> queryCategoryByBid(@Param("bid") Long bid);
}
